
class GoodsDetailModel {
  Goods_detail_responseBean goodsDetailResponse;

  static GoodsDetailModel fromMap(Map<String, dynamic> map) {
    if (map == null) return null;
    GoodsDetailModel goodsDetailModelBean = GoodsDetailModel();
    goodsDetailModelBean.goodsDetailResponse = Goods_detail_responseBean.fromMap(map['goods_detail_response']);
    return goodsDetailModelBean;
  }

  Map toJson() => {
    "goods_detail_response": goodsDetailResponse,
  };
}


class Goods_detail_responseBean {
  List<Goods_detailsBean> goodsDetails;
  String requestId;

  static Goods_detail_responseBean fromMap(Map<String, dynamic> map) {
    if (map == null) return null;
    Goods_detail_responseBean goods_detail_responseBean = Goods_detail_responseBean();
    goods_detail_responseBean.goodsDetails = List()..addAll(
      (map['goods_details'] as List ?? []).map((o) => Goods_detailsBean.fromMap(o))
    );
    goods_detail_responseBean.requestId = map['request_id'];
    return goods_detail_responseBean;
  }

  Map toJson() => {
    "goods_details": goodsDetails,
    "request_id": requestId,
  };
}


class Goods_detailsBean {
  String categoryName;
  dynamic cltCpnEndTime;
  dynamic cltCpnMinAmt;
  int couponRemainQuantity;
  dynamic cltCpnRemainQuantity;
  int promotionRate;
  int couponId;
  List<int> serviceTags;
  int mallId;
  String mallName;
  int mallCouponEndTime;
  dynamic cltCpnBatchSn;
  String lgstTxt;
  String goodsName;
  dynamic cltCpnDiscount;
  int goodsId;
  List<String> goodsGalleryUrls;
  String goodsDesc;
  String optName;
  List<int> optIds;
  String goodsImageUrl;
  bool hasMallCoupon;
  int minGroupPrice;
  int couponStartTime;
  int couponDiscount;
  int couponEndTime;
  int zsDuoId;
  int mallCouponRemainQuantity;
  int planType;
  dynamic cltCpnQuantity;
  double crtRfOrdrRto1m;
  List<int> catIds;
  int couponMinOrderAmount;
  int categoryId;
  int mallCouponDiscountPct;
  dynamic catId;
  int couponTotalQuantity;
  int mallCouponMinOrderAmount;
  int merchantType;
  dynamic cltCpnStartTime;
  String salesTip;
  int planTypeAll;
  bool onlySceneAuth;
  int mallCouponId;
  String descTxt;
  String goodsThumbnailUrl;
  int optId;
  dynamic searchId;
  int minNormalPrice;
  bool hasCoupon;
  int mallCouponStartTime;
  String servTxt;
  int mallRate;
  int mallCouponTotalQuantity;
  dynamic createAt;
  int mallCouponMaxDiscountAmount;
  int mallCps;

  static Goods_detailsBean fromMap(Map<String, dynamic> map) {
    if (map == null) return null;
    Goods_detailsBean goods_detailsBean = Goods_detailsBean();
    goods_detailsBean.categoryName = map['category_name'];
    goods_detailsBean.cltCpnEndTime = map['clt_cpn_end_time'];
    goods_detailsBean.cltCpnMinAmt = map['clt_cpn_min_amt'];
    goods_detailsBean.couponRemainQuantity = map['coupon_remain_quantity'];
    goods_detailsBean.cltCpnRemainQuantity = map['clt_cpn_remain_quantity'];
    goods_detailsBean.promotionRate = map['promotion_rate'];
    goods_detailsBean.couponId = map['coupon_id'];
    goods_detailsBean.serviceTags = List()..addAll(
      (map['service_tags'] as List ?? []).map((o) => int.tryParse(o.toString()))
    );
    goods_detailsBean.mallId = map['mall_id'];
    goods_detailsBean.mallName = map['mall_name'];
    goods_detailsBean.mallCouponEndTime = map['mall_coupon_end_time'];
    goods_detailsBean.cltCpnBatchSn = map['clt_cpn_batch_sn'];
    goods_detailsBean.lgstTxt = map['lgst_txt'];
    goods_detailsBean.goodsName = map['goods_name'];
    goods_detailsBean.cltCpnDiscount = map['clt_cpn_discount'];
    goods_detailsBean.goodsId = map['goods_id'];
    goods_detailsBean.goodsGalleryUrls = List()..addAll(
      (map['goods_gallery_urls'] as List ?? []).map((o) => o.toString())
    );
    goods_detailsBean.goodsDesc = map['goods_desc'];
    goods_detailsBean.optName = map['opt_name'];
    goods_detailsBean.optIds = List()..addAll(
      (map['opt_ids'] as List ?? []).map((o) => int.tryParse(o.toString()))
    );
    goods_detailsBean.goodsImageUrl = map['goods_image_url'];
    goods_detailsBean.hasMallCoupon = map['has_mall_coupon'];
    goods_detailsBean.minGroupPrice = map['min_group_price'];
    goods_detailsBean.couponStartTime = map['coupon_start_time'];
    goods_detailsBean.couponDiscount = map['coupon_discount'];
    goods_detailsBean.couponEndTime = map['coupon_end_time'];
    goods_detailsBean.zsDuoId = map['zs_duo_id'];
    goods_detailsBean.mallCouponRemainQuantity = map['mall_coupon_remain_quantity'];
    goods_detailsBean.planType = map['plan_type'];
    goods_detailsBean.cltCpnQuantity = map['clt_cpn_quantity'];
    goods_detailsBean.crtRfOrdrRto1m = map['crt_rf_ordr_rto1m'];
    goods_detailsBean.catIds = List()..addAll(
      (map['cat_ids'] as List ?? []).map((o) => int.tryParse(o.toString()))
    );
    goods_detailsBean.couponMinOrderAmount = map['coupon_min_order_amount'];
    goods_detailsBean.categoryId = map['category_id'];
    goods_detailsBean.mallCouponDiscountPct = map['mall_coupon_discount_pct'];
    goods_detailsBean.catId = map['cat_id'];
    goods_detailsBean.couponTotalQuantity = map['coupon_total_quantity'];
    goods_detailsBean.mallCouponMinOrderAmount = map['mall_coupon_min_order_amount'];
    goods_detailsBean.merchantType = map['merchant_type'];
    goods_detailsBean.cltCpnStartTime = map['clt_cpn_start_time'];
    goods_detailsBean.salesTip = map['sales_tip'];
    goods_detailsBean.planTypeAll = map['plan_type_all'];
    goods_detailsBean.onlySceneAuth = map['only_scene_auth'];
    goods_detailsBean.mallCouponId = map['mall_coupon_id'];
    goods_detailsBean.descTxt = map['desc_txt'];
    goods_detailsBean.goodsThumbnailUrl = map['goods_thumbnail_url'];
    goods_detailsBean.optId = map['opt_id'];
    goods_detailsBean.searchId = map['search_id'];
    goods_detailsBean.minNormalPrice = map['min_normal_price'];
    goods_detailsBean.hasCoupon = map['has_coupon'];
    goods_detailsBean.mallCouponStartTime = map['mall_coupon_start_time'];
    goods_detailsBean.servTxt = map['serv_txt'];
    goods_detailsBean.mallRate = map['mall_rate'];
    goods_detailsBean.mallCouponTotalQuantity = map['mall_coupon_total_quantity'];
    goods_detailsBean.createAt = map['create_at'];
    goods_detailsBean.mallCouponMaxDiscountAmount = map['mall_coupon_max_discount_amount'];
    goods_detailsBean.mallCps = map['mall_cps'];
    return goods_detailsBean;
  }

  Map toJson() => {
    "category_name": categoryName,
    "clt_cpn_end_time": cltCpnEndTime,
    "clt_cpn_min_amt": cltCpnMinAmt,
    "coupon_remain_quantity": couponRemainQuantity,
    "clt_cpn_remain_quantity": cltCpnRemainQuantity,
    "promotion_rate": promotionRate,
    "coupon_id": couponId,
    "service_tags": serviceTags,
    "mall_id": mallId,
    "mall_name": mallName,
    "mall_coupon_end_time": mallCouponEndTime,
    "clt_cpn_batch_sn": cltCpnBatchSn,
    "lgst_txt": lgstTxt,
    "goods_name": goodsName,
    "clt_cpn_discount": cltCpnDiscount,
    "goods_id": goodsId,
    "goods_gallery_urls": goodsGalleryUrls,
    "goods_desc": goodsDesc,
    "opt_name": optName,
    "opt_ids": optIds,
    "goods_image_url": goodsImageUrl,
    "has_mall_coupon": hasMallCoupon,
    "min_group_price": minGroupPrice,
    "coupon_start_time": couponStartTime,
    "coupon_discount": couponDiscount,
    "coupon_end_time": couponEndTime,
    "zs_duo_id": zsDuoId,
    "mall_coupon_remain_quantity": mallCouponRemainQuantity,
    "plan_type": planType,
    "clt_cpn_quantity": cltCpnQuantity,
    "crt_rf_ordr_rto1m": crtRfOrdrRto1m,
    "cat_ids": catIds,
    "coupon_min_order_amount": couponMinOrderAmount,
    "category_id": categoryId,
    "mall_coupon_discount_pct": mallCouponDiscountPct,
    "cat_id": catId,
    "coupon_total_quantity": couponTotalQuantity,
    "mall_coupon_min_order_amount": mallCouponMinOrderAmount,
    "merchant_type": merchantType,
    "clt_cpn_start_time": cltCpnStartTime,
    "sales_tip": salesTip,
    "plan_type_all": planTypeAll,
    "only_scene_auth": onlySceneAuth,
    "mall_coupon_id": mallCouponId,
    "desc_txt": descTxt,
    "goods_thumbnail_url": goodsThumbnailUrl,
    "opt_id": optId,
    "search_id": searchId,
    "min_normal_price": minNormalPrice,
    "has_coupon": hasCoupon,
    "mall_coupon_start_time": mallCouponStartTime,
    "serv_txt": servTxt,
    "mall_rate": mallRate,
    "mall_coupon_total_quantity": mallCouponTotalQuantity,
    "create_at": createAt,
    "mall_coupon_max_discount_amount": mallCouponMaxDiscountAmount,
    "mall_cps": mallCps,
  };
}